#pragma once

#define SCREEN_WIDTH 800
#define SCREEN_HEIGHT 600
#define CAMERA_WIDTH_CONSTRAINT 325
#define CAMERA_HEIGHT_CONSTRAINT 200

#define CULL_LOW -40
#define CULL_HIGH 840

#define GAME Game::GetInstance()
#define CAMERA Camera::GetInstance()
#define GRAPHICS SGD::GraphicsManager::GetInstance()
#define AUDIO SGD::AudioManager::GetInstance()

// Set this to false to disable debugging
#define DEBUG false
#define ARCADE 0	// 1 = ARCADE; 0 = NORMAL

#if ARCADE
#define KEYESCAPE (Input->IsButtonPressed(0, 6))
#define KEYDOWN (Input->GetLeftJoystick(0).y == 1)
#define KEYUP (Input->GetLeftJoystick(0).y == -1)
#define KEYLEFT (Input->GetLeftJoystick(0).x == -1)
#define KEYRIGHT (Input->GetLeftJoystick(0).x == 1)
#define KEYDOWNPRESSED (Input->GetLeftJoystick(0).y == 1 && GAME->GetInput())
#define KEYUPPRESSED (Input->GetLeftJoystick(0).y == -1 && GAME->GetInput())
#define KEYLEFTPRESSED (Input->GetLeftJoystick(0).x == -1 && GAME->GetInput())
#define KEYRIGHTPRESSED (Input->GetLeftJoystick(0).x == 1 && GAME->GetInput())
#define KEYENTER (Input->IsButtonPressed(0, 0))
#define KEYATTACK KEYENTER
#define KEYJUMP (Input->IsButtonPressed(0, 1))
#else
#define KEYESCAPE (Input->IsKeyPressed(SGD::Key::Escape) || Input->IsButtonPressed(0, 1))
#define KEYDOWNPRESSED (Input->IsKeyPressed(SGD::Key::S) || Input->IsKeyPressed(SGD::Key::Down) || Input->IsDPadPressed(0, SGD::DPad::Down))
#define KEYUPPRESSED (Input->IsKeyPressed(SGD::Key::W) || Input->IsKeyPressed(SGD::Key::Up) || Input->IsDPadPressed(0, SGD::DPad::Up))
#define KEYLEFTPRESSED (Input->IsKeyPressed(SGD::Key::A) || Input->IsKeyPressed(SGD::Key::Left) || Input->IsDPadPressed(0, SGD::DPad::Left))
#define KEYRIGHTPRESSED (Input->IsKeyPressed(SGD::Key::D) || Input->IsKeyPressed(SGD::Key::Right) || Input->IsDPadPressed(0, SGD::DPad::Right))
#define KEYDOWN (Input->IsKeyDown(SGD::Key::S) || Input->IsKeyDown(SGD::Key::Down) || Input->IsDPadDown(0, SGD::DPad::Down))
#define KEYUP (Input->IsKeyDown(SGD::Key::W) || Input->IsKeyDown(SGD::Key::Up) || Input->IsDPadDown(0, SGD::DPad::Up))
#define KEYLEFT (Input->IsKeyDown(SGD::Key::A) || Input->IsKeyDown(SGD::Key::Left) || Input->IsDPadDown(0, SGD::DPad::Left))
#define KEYRIGHT (Input->IsKeyDown(SGD::Key::D) || Input->IsKeyDown(SGD::Key::Right) || Input->IsDPadDown(0, SGD::DPad::Right))
#define KEYENTER (Input->IsKeyPressed(SGD::Key::Enter) || Input->IsButtonPressed(0, 0))
#define KEYATTACK (Input->IsKeyPressed(SGD::Key::Shift) || Input->IsButtonPressed(0, 3))
#define KEYJUMP (Input->IsKeyPressed(SGD::Key::Space) || Input->IsButtonPressed(0, 0))
#endif